class_name GameOverScreen
extends Control



@onready var timer: Timer = $Timer
@onready var scoreIndicator: ScoreIndicator = $Background/MarginContainer/VBoxContainer/HBoxContainer/ScoreIndicator


## 延迟显示分数的时间（秒）
@export var delay_time: float = 2.0


var _score: int = 0


func _ready():
	timer.one_shot = true
	timer.wait_time = delay_time
	timer.timeout.connect(on_timer_timeout)
	timer.start()



func set_score(score: int):
	_score = score


func on_timer_timeout():
	scoreIndicator.set_score(_score)
